        var _BCP_ = {};
        for(var i in ADF){
            if(ADF.hasOwnProperty(i)){
                _BCP_[i] = ADF[i];
            }
        }
        var model = {};
        //XXX 测试代码
        window.model = model;


        //复写方法
        Override.laydateChoose = function(ele, date){
            var bind = _BCP_.getTextBinding(ele);
            if(bind){
                model[bind](date);
            }
        }


        _BCP_.businessType = '<%- businessType %>';
        _BCP_.initModel = function (m) {
            for (var key in m) {
                if (m.hasOwnProperty(key)) {
                    model[key] = ko.observable();
                }
            }
            ko.applyBindings(model, parentDom);
            //处理bcpNumber在设置了模型后，无法执行千分位操作的问题
            var bcpNumbers = ADF.getElementsByADFControlType("BCPNumber");
            for(var i=0;i<bcpNumbers.length;i++){
                var bcpNumber = bcpNumbers[i].getElementsByTagName("input")[0];
                var binding = _BCP_.getTextBinding(bcpNumber);
                if(binding){
                    (function(bcpNumber, binding){
                        model[binding].subscribe(function(newValue) {
                            bcpNumber.value = convertNumber(bcpNumber);
                        });
                    })(bcpNumber, binding);
                }
            }
            _BCP_.setModel(m);
        };
        _BCP_.setModel = function (m) {
            for (var func in model) {
                if (model.hasOwnProperty(func) && model[func] instanceof Function) {
                    model[func].call(model, m[func]);
                }
            }
        };
        _BCP_.getModel = function () {
            var tmp = {};
            for (var func in model) {
                if (model.hasOwnProperty(func) && model[func] instanceof Function) {
                    tmp[func] = model[func].call(model);
                }
            }
            return tmp;
        };

        _BCP_.invokeBizMethod = function(bizMethod, param, callback,errorCallBack,async){
            if(_BCP_.businessType){
                var url = '/biz/' + _BCP_.businessType + '/' + bizMethod;
                MK.invokeServer(url, 'post', param, callback,errorCallBack,async);//Abrazos.invokeServer(url, 'post', param, callback);
            }else{
                console.error('没有指定绑定业务类型名称，无法进行调用');
            }
        };
		
        _BCP_.getTextBinding = function(dom){
            var binding = null;
            var tmp = $(dom).attr("data-bind");
            if(tmp){
                var arr = tmp.split(',');
                for(var i = 0; i < arr.length; i++){
                    var bindTmp = arr[i];
                    var bindTmpArr = bindTmp.split(':');
                    var key = bindTmpArr[0].trim();
                    if(key == "text" || key == "value"){
                        binding = bindTmpArr[1].trim();
                        break;
                    }
                }
            }
            return binding;
        }
		
		/*
			BILL
		*/
		_BCP_.bill = BILL.createBillObject(parentDom,_BCP_);
		
        var _subTableContents = <%- JSON.stringify(subTableContents) %>;
        var _subTableH5Contents = <%- JSON.stringify(subTableH5Contents) %>;

        var bcpButtons = ADF.getElementsByADFControlType("BCPButton");
        $(bcpButtons).click(function(){
            var actionBinding = $(this).attr('bcp-action-binding');
            if(actionBinding){
				/*
					BILL actions
				*/
                var func = null;
				try{
					func = eval("_BCP_.bill." + actionBinding);
				}catch(err){
					func = eval(actionBinding);
				}
				
                func(parentDom);
            }
        });

        var subtables = ADF.getElementsByADFControlType("Subtable");
        $(subtables).each(function(index,element){
            Abrazos.getBlocks(element, function(block){
                var id = $(element).attr('adfid');
                var model = _subTableContents[id];
				/*TODO*/
                block[0].init(model.tableData,_BCP_);
            });
        });
		
        var subtableH5s = ADF.getElementsByADFControlType("SubtableH5");
        $(subtableH5s).each(function(index,element){
            Abrazos.getBlocks(element, function(block){
                var id = $(element).attr('adfid');
                var model = _subTableH5Contents[id];
				/*TODO*/
                block[0].init(model.tableData,_BCP_);
            });
        }); 

        var listbasedata = ADF.getElementsByADFControlType("Listbasedata");
        $(listbasedata).each(function(index,element){
            Abrazos.getBlocks(element, function(block){
                block[0].init(_BCP_);
            });
        });



        

        


